#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5,mod=998244353;
long long fa[N],ans,n,m,k,s,p[N],w[N],l,r,o;
vector<int>q[N];
bool cmp(int i,int j)
{
	return w[i]<w[j];
}
long long ksm(long long i,long long j)
{
	long long ans1=1;
	while(j)
	{
		ans1=(ans1*i)%mod;
		j/=2;
		i=(i*i)%mod;
	}
	return ans1;
}
bool pd(int i)
{
	bool id=0;
	for(int j=0;j<q[i].size();++j)
	{
		if(fa[i]==q[i][j]) continue;
		fa[q[i][j]]=i;
		id|=(w[q[i][j]]==w[i]);
		id|=pd(q[i][j]);
	} 
	return id;
}
void cheak()
{
	o=0;
	sort(p+1,p+s+1,cmp);
	for(int j=1;j<=s;++j)
		if(w[p[j]]!=w[p[j-1]])
			++o;
	if(!pd(1))
		ans=(ans+ksm(o,k))%mod;
}
void dfs(int i)
{
	if(i==n+1)
	{
		cheak();
		return;
	}
	for(int j=1;j<=m;++j)
		w[i]=j,dfs(i+1);
}
int main()
{
	freopen("tree.in","r",stdin);
	freopen("tree.out","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin>>n>>m>>k>>s;
	for(int i=1;i<=s;++i)
		cin>>p[i];
	for(int i=1;i<n;++i)
		cin>>l>>r,q[l].push_back(r),q[r].push_back(l);
	dfs(1);
	cout<<ans;
}
